using Gateway.Common.Entity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Gateway.Domain.EFCore.Configuration;

public class AggregateRootEntityConfiguration<T> : EntityWithOperatorStatusConfiguration<T> where T : AggregateRootEntityBase
{
    public override void Configure(EntityTypeBuilder<T> builder)
    {
        base.Configure(builder);
        builder.Property(x => x.Timestamp).HasColumnName("Timestamp").IsRowVersion().IsConcurrencyToken().HasComment("时间戳");
    }
}